package main.controller;

import java.util.List;

import main.entity.MessageVO;
import main.service.BaseService;
import main.service.MsgService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/msg")
public class MsgCtrl extends BaseService<MessageVO> {

	@Autowired
	private MsgService msgService;
	
	@RequestMapping("/check")
	@ResponseBody
	public List<MessageVO> check(Integer uIDFrom){
		List<MessageVO> newMsgs = msgService.checkNewMsgs(uIDFrom);
		return newMsgs;
	}
	
}
